package com.chen.operator;

public class OperatorDemo1 {
    public static void main(String[] args) {
        // 目标，搞清楚基本的算数运算符
        print(10, 20);
        System.out.println("----------------");
        print2();
    }
        public static void print(int a, int b) {
            System.out.println(a + b);
            System.out.println(a - b);
            System.out.println(a * b);
            System.out.println(a / b);
            System.out.println(a % b);
        }
        // 需求，研究＋符号做连接符还是做运算符
    public static void print2() {
        int a = 10;
        System.out.println("abc" + a); // abc10
        System.out.println(a + 5); // 15
        System.out.println("abc" + a + "a"); // abc10a
        System.out.println(a + 'a' + "chen"); // 107chen

    }
}
